package com.dongdongshop.pojo.comment;

import org.slf4j.LoggerFactory;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;


@Document(collection = "comment")
public class Comment implements Serializable {
    @Id
    private String id;
    private Long goodId;
    private Long userId;
    private String userName;
 //   @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date startTime;
    private Date addTime;
    private String pic;
    private String content;
    private int starts;
    private String level;
    private Long likeNum;//点赞数
    private String parentId;//父级id

    public Long getLikeNum() {
        return likeNum;
    }

    public void setLikeNum(Long likeNum) {
        this.likeNum = likeNum;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    @Override
    public String toString() {
        return "Comment{" +
                "id='" + id + '\'' +
                ", goodId=" + goodId +
                ", userId=" + userId +
                ", userName='" + userName + '\'' +
                ", startTime=" + startTime +
                ", addTime=" + addTime +
                ", pic='" + pic + '\'' +
                ", content='" + content + '\'' +
                ", starts=" + starts +
                ", level='" + level + '\'' +
                ", likeNum=" + likeNum +
                ", parentId='" + parentId + '\'' +
                '}';
    }

    public Comment(String id, Long goodId, Long userId, String userName, Date startTime, Date addTime, String pic, String content, int starts, String level, Long likeNum, String parentId) {
        this.id = id;
        this.goodId = goodId;
        this.userId = userId;
        this.userName = userName;
        this.startTime = startTime;
        this.addTime = addTime;
        this.pic = pic;
        this.content = content;
        this.starts = starts;
        this.level = level;
        this.likeNum = likeNum;
        this.parentId = parentId;
    }

    public Comment() {
    }

    public int getStarts() {
        return starts;
    }

    public void setStarts(int starts) {
        this.starts = starts;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Long getGoodId() {
        return goodId;
    }

    public void setGoodId(Long goodId) {
        this.goodId = goodId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getAddTime() {
        return addTime;
    }

    public void setAddTime(Date addTime) {
        this.addTime = addTime;
    }

    public String getPic() {
        return pic;
    }

    public void setPic(String pic) {
        this.pic = pic;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }


}
